<template>
  <div id="app">
    <ul v-if="!isFullPage">
      <routerLink :to="{ name: 'home' }">
        <i class="iconfont">&#xe61b;</i>
        <span> 首页</span>
      </routerLink>
      <routerLink to="/catalog">
        <i class="iconfont">&#xe648;</i>
        <span> 分类</span>
      </routerLink>
      <routerLink :to="{ name: 'integration'}">
        <i class="iconfont">&#xe8af;</i>
        <span> 发现</span>
      </routerLink>
      <routerLink to="/cart">
        <i class="iconfont">&#xe655;</i>
        <span>购物车</span>
      </routerLink>
      <routerLink to="/user">
        <i class="iconfont">&#xe7ab;</i>
        <span> 我</span>
      </routerLink>
    </ul>
    <router-view />
    <div class="nav"></div>
  </div>
</template>
<script>
export default {
  computed: {
    isFullPage() {
      // console.log(this.$route.meta.fullPage);
      return this.$route.meta.fullPage
    }
  }
}
</script>
<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#app>ul {
  position: fixed;
  width: 100%;
  bottom: 0px;
  display: flex;
  justify-content: space-around;
  z-index: 9999;
  background-color: #fff;
  padding-top: 1.3333vw;
  border-top: .2667vw solid #f0f0f0;
  height: 13.3333vw;
  box-sizing: border-box;
}

#app>ul>a {
  text-decoration: none;
  color: black;
  display: flex;
  flex-direction: column;
  font-size: 3.2vw;
  height: 13.3333vw;
  width: 20%;
  align-content: space-between;
}

#app>ul>a>i.iconfont {
  font-size: 6.6667vw;
  margin-bottom: 1.3333vw;
  font-weight: 900;
}

#app>ul>a.router-link-active {
  color: #f20e28;
}
#app>.nav{
  width: 100%;
  height: 13.3333vw;
}

body,html {
  width: 100%;
  overflow-x: hidden;
  /* 禁用水平滚动 */
  overflow-y: auto;
  /* 允许垂直滚动 */
  background-color: #f3f3f3;
}
</style>
